package firm;

import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;

public class Boss extends Thread 
{
	//private Koordynator koordynator;
 	private int m_nLiczba;
 	private AtomicInteger current_Tasks;
	int m,n, ccount, i=0, j, random;
	Random generator = new Random();
	GlobalData global;
	private Task[] task_Array;
	
 	public Boss( int liczba, Task[] task_Array) 
	{
 		//this.koordynator = t;
  		this.m_nLiczba = liczba;
  		this.task_Array = task_Array;
  	//	this.current_Tasks = number_of_Tasks;
	}
 	
	
	public void run() 
	{
		while(true){
			
				//synchronized(koordynator.number_of_Tasks){

			GlobalData.cTalking.wloz(this.m_nLiczba, task_Array);
					try {
						sleep((int)(GlobalData.BOSS_SLEEP));
					} 
					catch (InterruptedException e) {  }
			
			//	}
		}
	}
}

